-- @Author: 作者QQ2308873645
-- @Date:   2021-11-27 13:12:32
-- @Last Modified by:   作者QQ381990860
-- @Last Modified time: 2022-07-23 06:59:06
local 场景类_宝石系统栏 = class(窗口逻辑)

local zts,zts1,tp
local insert = table.insert
function 场景类_宝石系统栏:初始化(根)
    self.ID = 567
    self.x = 100+(全局游戏宽度-800)/2
    self.y = 60
    self.xx = 0
    self.yy = 0
    self.注释 = "宝石系统栏"
        tp = 根
end
function 场景类_宝石系统栏:加载(根)

    self.鼠标 = false
    self.焦点 = false
    self.可移动 = true
    local 资源 = 根.资源
    local 按钮 = 根._按钮
    local 自适应 = 根._自适应
    self.资源组 = {
        [1] = 自适应.创建(0,1,630,420,3,9),
        [2] = 按钮.创建(自适应.创建(18,4,16,16,4,3),0,0,4,true,true),
        [3] = 按钮.创建(自适应.创建(11,4,90,20,1,3),0,0,4,true,true,"一键吃宝石"),


    }
    self.装饰 =资源:载入('JM.dll',"网易WDF动画",0x891CA42C)
    -- for n=2,2 do
       self.资源组[2]:绑定窗口_(567)
       self.资源组[3]:绑定窗口_(567)
    -- self.资源组[3]:置偏移(-1,0)
    self.窗口时间 = 0

    zts = tp.字体表.华康字体
    zts1 = tp.字体表.华康字体
end

function 场景类_宝石系统栏:打开(数据)
    if self.可视 then
        self.可视 = false
    else
    if  self.x > 全局游戏宽度 then
       self.x = 260+(全局游戏宽度-800)/2
    end
    self:加载(tp)
    self.宝石数据=数据
        insert(tp.窗口_,self)

        tp.运行时间 = tp.运行时间 + 1
        self.窗口时间 = tp.运行时间
        self.可视 = true
    end
end

function 场景类_宝石系统栏:刷新信息(数据)
    self.宝石数据=数据
end
function 场景类_宝石系统栏:显示(dt,x,y)
    local bs = self.宝石数据
    self.焦点 = false
    self.资源组[2]:更新(x,y)
    self.资源组[3]:更新(x,y)
    self.装饰:更新()


    if self.资源组[2]:事件判断() then
        self:打开()
        return false
    elseif self.资源组[3]:事件判断() then
        客户端:发送数据(1,468,13)
    end

    self.资源组[1]:显示(self.x,self.y)
 tp.窗口标题背景_:显示(self.x+self.资源组[1].宽度/2-70,self.y+0)
    --Picture.标题:显示(self.x+215,self.y)

    zts1:置字间距(3)
    zts1:置颜色(0xFFFFFFFF):显示(self.x+281,self.y+3,"宝石系统")
    self.资源组[2]:显示(self.x + 610,self.y + 3)
    self.资源组[3]:显示(self.x + 520,self.y + 380)
    self.装饰:显示(self.x + 0,self.y + 230)
    self.装饰:显示(self.x + 190,self.y + 230)
    self.装饰:显示(self.x + 360,self.y + 230)


        zts:置颜色(0xFFFFFF00)
        zts:显示(self.x + 20,self.y + 40,"月亮石已使用")
        zts:显示(self.x + 20,self.y + 70,"红玛瑙已使用")
        zts:显示(self.x + 20,self.y + 100,"舍利子已使用")
        zts:显示(self.x + 20,self.y + 130,"太阳石已使用")
        zts:显示(self.x + 20,self.y + 160,"光芒石已使用")
        zts:显示(self.x + 20,self.y + 190,"黑宝石已使用")
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+40,bs.月亮石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+70,bs.红玛瑙)
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+100,bs.舍利子)
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+130,bs.太阳石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+160,bs.光芒石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+125,self.y+190,bs.黑宝石)
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+40,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+70,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+100,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+130,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+160,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+200,self.y+190,"个")
        zts:置颜色(0xFFFFFF00)
        zts:显示(self.x + 220,self.y + 40,"等级:")
        zts:显示(self.x + 220,self.y + 70,"等级:")
        zts:显示(self.x + 220,self.y + 100,"等级:")
        zts:显示(self.x + 220,self.y + 130,"等级:")
        zts:显示(self.x + 220,self.y + 160,"等级:")
        zts:显示(self.x + 220,self.y + 190,"等级:")
        zts:置颜色(0xFFC8B998)
        zts:显示(self.x + 260,self.y + 40,"[ ]")
        zts:显示(self.x + 260,self.y + 70,"[ ]")
        zts:显示(self.x + 260,self.y + 100,"[ ]")
        zts:显示(self.x + 260,self.y + 130,"[ ]")
        zts:显示(self.x + 260,self.y + 160,"[ ]")
        zts:显示(self.x + 260,self.y + 190,"[ ]")
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +42,bs.月亮石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +72,bs.红玛瑙等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +102,bs.舍利子等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +132,bs.太阳石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +162,bs.光芒石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+265,self.y +192,bs.黑宝石等级)
        zts:置颜色(0xFFFFFF00)
        zts:显示(self.x + 300,self.y + 40,"速度精魄灵石已使用")
        zts:显示(self.x + 300,self.y + 70,"气血精魄灵石已使用")
        zts:显示(self.x + 300,self.y + 100,"灵力精魄灵石已使用")
        zts:显示(self.x + 300,self.y + 130,"躲避精魄灵石已使用")
        zts:显示(self.x + 300,self.y + 160,"防御精魄灵石已使用")
        zts:显示(self.x + 300,self.y + 190,"伤害精魄灵石已使用")
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+40,bs.速度精魄灵石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+70,bs.气血精魄灵石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+100,bs.灵力精魄灵石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+130,bs.躲避精魄灵石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+160,bs.防御精魄灵石)
        zts1:置颜色(0xFF8C96F6):显示(self.x+455,self.y+190,bs.伤害精魄灵石)
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+40,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+70,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+100,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+130,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+160,"个")
        zts1:置颜色(0xFFFFFFFF):显示(self.x+530,self.y+190,"个")
        zts:置颜色(0xFFFFFF00)
        zts:显示(self.x + 550,self.y + 40,"等级:")
        zts:显示(self.x + 550,self.y + 70,"等级:")
        zts:显示(self.x + 550,self.y + 100,"等级:")
        zts:显示(self.x + 550,self.y + 130,"等级:")
        zts:显示(self.x + 550,self.y + 160,"等级:")
        zts:显示(self.x + 550,self.y + 190,"等级:")
        zts:置颜色(0xFFC8B998)
        zts:显示(self.x + 590,self.y + 40,"[ ]")
        zts:显示(self.x + 590,self.y + 70,"[ ]")
        zts:显示(self.x + 590,self.y + 100,"[ ]")
        zts:显示(self.x + 590,self.y + 130,"[ ]")
        zts:显示(self.x + 590,self.y + 160,"[ ]")
        zts:显示(self.x + 590,self.y + 190,"[ ]")
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +42,bs.速度精魄灵石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +72,bs.气血精魄灵石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +102,bs.灵力精魄灵石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +132,bs.躲避精魄灵石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +162,bs.防御精魄灵石等级)
        tp.字体表.描边字体__:置颜色(0xFFFFFF00):显示(self.x+595,self.y +192,bs.伤害精魄灵石等级)
        zts:置颜色(0xFFC8B998)
        zts:显示(self.x + 20,self.y + 260,"当前人物增加属性如下↓")
        zts:显示(self.x + 290,self.y + 260,"当前召唤兽增加属性如下↓")
        zts:置颜色(0xFF00f3ff)
        zts:显示(self.x + 20,self.y + 290,"气血")
        zts:显示(self.x + 20,self.y + 310,"防御")
        zts:显示(self.x + 20,self.y + 330,"伤害")
        zts:显示(self.x + 20,self.y + 350,"灵力")
        zts:显示(self.x + 20,self.y + 370,"速度")
        zts:显示(self.x + 290,self.y + 290,"气血")
        zts:显示(self.x + 290,self.y + 310,"伤害")
        zts:显示(self.x + 290,self.y + 330,"速度")
        zts:显示(self.x + 290,self.y + 350,"灵力")
        zts:显示(self.x + 290,self.y + 370,"防御")
        zts:显示(self.x + 290,self.y + 390,"躲避")
        zts:置颜色(0xFFa51410)
        zts:显示(self.x + 60,self.y + 290,"↑")
        zts:显示(self.x + 60,self.y + 310,"↑")
        zts:显示(self.x + 60,self.y + 330,"↑")
        zts:显示(self.x + 60,self.y + 350,"↑")
        zts:显示(self.x + 60,self.y + 370,"↑")
        if bs.光芒石属性 == "气血" and bs.红玛瑙属性 == "气血" then
           zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,bs.光芒石等级*160+bs.红玛瑙等级*160)
           zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
           zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
           zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
           zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24)
           zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+290,"红玛瑙额外+"..bs.红玛瑙等级*160)
        elseif bs.光芒石属性 == "气血" and bs.红玛瑙属性 == "灵力" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,bs.光芒石等级*160)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24+bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+350,"红玛瑙额外+"..bs.红玛瑙等级*24)
        elseif bs.光芒石属性 == "气血" and bs.红玛瑙属性 == "防御" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,bs.光芒石等级*160)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24+bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+310,"红玛瑙额外+"..bs.红玛瑙等级*24)
        elseif bs.光芒石属性 == "气血" and bs.红玛瑙属性 == "伤害" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,bs.光芒石等级*160)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32+bs.红玛瑙等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+330,"红玛瑙额外+"..bs.红玛瑙等级*32)
        elseif bs.光芒石属性 == "速度" and bs.红玛瑙属性 == "气血" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,bs.红玛瑙等级*160)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24+bs.光芒石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+370,"光芒石额外+"..bs.光芒石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+290,"红玛瑙额外+"..bs.红玛瑙等级*160)
        elseif bs.光芒石属性 == "速度" and bs.红玛瑙属性 == "灵力" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,"0")
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24+bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24+bs.光芒石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+350,"红玛瑙额外+"..bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+370,"光芒石额外+"..bs.光芒石等级*24)
        elseif bs.光芒石属性 == "速度" and bs.红玛瑙属性 == "防御" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,"0")
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24+bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24+bs.光芒石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+310,"红玛瑙额外+"..bs.红玛瑙等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+370,"光芒石额外+"..bs.光芒石等级*24)
        elseif bs.光芒石属性 == "速度" and bs.红玛瑙属性 == "伤害" then
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+290,"0")
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+310,bs.月亮石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+330,bs.太阳石等级*32+bs.红玛瑙等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+350,bs.舍利子等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+80,self.y+370,bs.黑宝石等级*24+bs.光芒石等级*24)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+330,"红玛瑙额外+"..bs.红玛瑙等级*32)
            zts1:置颜色(0xFF8C96F6):显示(self.x+140,self.y+370,"光芒石额外+"..bs.光芒石等级*32)
        end

        zts:置颜色(0xFFa51410)
        zts:显示(self.x + 330,self.y + 290,"↑")
        zts:显示(self.x + 330,self.y + 310,"↑")
        zts:显示(self.x + 330,self.y + 330,"↑")
        zts:显示(self.x + 330,self.y + 350,"↑")
        zts:显示(self.x + 330,self.y + 370,"↑")
        zts:显示(self.x + 330,self.y + 390,"↑")
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+290,bs.气血精魄灵石等级*240)
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+310,bs.伤害精魄灵石等级*40)
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+330,bs.速度精魄灵石等级*24)
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+350,bs.灵力精魄灵石等级*16)
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+370,bs.防御精魄灵石等级*32)
        zts1:置颜色(0xFF8C96F6):显示(self.x+350,self.y+390,bs.躲避精魄灵石等级*80)

end



return 场景类_宝石系统栏